<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>热门推荐- {{config.SITENAME}} - 小程序应用市场|小程序分发平台|小程序商店</title>
    <meta name="keywords" content="MiniAppStore,小程序,应用市场,分发平台,小程序商店"/>
    <meta name="description" content="MiniAppStore小程序应用市场|小程序分发平台|小程序商店"/>
    {% include "../common/head.html" %}
</head>

<body class="gray-bg">
{% include "../common/nav.html" %}
<div class="main-page">
    <div class="container">
        <div class="row">
            <div class="col-xs-12 col-sm-8 col-md-8">
                <div class="ibox">
                    <div class="ibox-title">
                        <h2>{{typeName}} 排行榜 </h2>
                    </div>
                    <div class="ibox-content appdetail">
                        <div class="feed-activity-list">
                            {% for app in apps %}
                            <div class="col-xs-6 col-sm-6 col-md-6  col-lg-3">
                                <div class="feed-element">
                                    <p class="text-center">
                                        <a href="/app/detail/{{app.Id}}">
                                            <img alt="image" src="{{app.Ico}}" width="90px" height="90px"/>
                                        </a>
                                    </p>
                                    <p class="text-center text-truncate">
                                        <a href="/app/detail/{{app.Id}}">{{app.Name}}</a>
                                    </p>
                                </div>
                            </div>
                            {% endfor %}
                        </div>
                        <div class="box-footer clearfix">
                              <p>
                            <ul class="pagination pagination-sm  pull-right"
                                url="/app/list/type-{{type}}"
                                currentPage="{{pageNumber}}"
                                pageCount="{{totalPage}}">
                            </ul>
                              </p>
                        </div>

                    </div>
                </div>
            </div>
            <div class="col-sm-4 col-md-4">
                <div class="ibox">
                    <div class="ibox-title">
                        <h2>热门推荐</h2>
                    </div>
                    <div class="ibox-content appdetail">
                        {% for app in recommends %}
                        <div class="col-sm-12 appdetail">
                            <a href="/app/detail/{{app.Id}}" class="btn-link" target="_blank">
                                <div class="appico">
                                    <img alt="{{app.Name}}" class="m-t-xs img-responsive list-thumbnail-small"
                                         src="{{app.Ico}}">
                                </div>
                                <div class="appname-small">
                                    <h2>{{app.Name}}</h2>
                                    <p>{{app.TYPENAME}}</p>
                                </div>
                            </a>
                        </div>
                        {% endfor %}
                    </div>
                    <div class="ibox-footer clearfix">
                    </div>
                </div>
            </div>

        </div>
        <div class="row">
            <div class="col-xs-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h2> 所有分类 </h2>
                    </div>
                    <div class="ibox-content">
                        <a class="btn-group .btn-group-justified" role="group" aria-label="...">
                            {% for type in allType %}
                            <a href="/app/list/type-{{type.Id}}">
                                <button type="button " class="btn btn-info">{{type.Name}}</button>
                            </a>
                            <!--<button type="button" class="btn btn-default">Middle</button>
                            <button type="button" class="btn btn-default">Right</button>-->
                            {% endfor %}

                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% include "../common/footer.html" %}
<script src="/assets/common/js/extendPagination.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        var type = "{{type}}";
        $(".apptypeList").each(function () {
            var dataid = $(this).attr("data-id");
            if (dataid == type) {
                $(this).addClass("currtype");
            } else {
                $(this).removeClass("currtype");
            }
        });
    });
    $(function () {
        $(".pagination").jeesns_page("jeesnsPageForm");
    });
</script>
</body>
</html>